<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Monorel extends CI_Controller {

	public function __construct()
{
	parent::__construct();
	
	$this->load->model('monorel_model');
	$this->load->helper('url');
}

public function index()
{
	
	$data['monorel'] = $this->monorel_model->get_info();

	$this->load->view('index', $data);
}

public function tambah()
{
	$this->load->view('tambah');
}

public function proses_tambah()
{
	$this->load->model('monorel_model','',TRUE);
	
	$this->monorel_model->tambah_info();
	
	redirect('index','refresh');

}

public function edit($id_jadwal)
{
	$id_jadwal = 
	
	$data['monorel'] = $this->monorel_model->get_monorel_edit($id_jadwal);

	$this->load->view('edit', $data);
}

public function proses_edit()
{
	$this->load->model('monorel_model','',TRUE);
	
	$this->monorel_model->edit_monorel();
	
	redirect('index','refresh');

}

public function proses_hapus($id_jadwal)
{
	$this->load->model('monorel_model','',TRUE);
	
	$this->monorel_model->hapus_monorel($id_jadwal);
	
	redirect('index','refresh');

}

public function cctv()
{
	
	$data['monorel'] = $this->monorel_model->get_info();

	$this->load->view('cctv', $data);
}

	
	
}




